package com.anxin.registerManagement.service;

import com.anxin.registerManagement.bean.persist.Comment;
import com.anxin.registerManagement.mapper.CommentMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class CommentService {

    private static Logger logger = LoggerFactory.getLogger(CommentService.class);

    @Autowired
    CommentMapper commentMapper;

    /**
     * 添加评论
     */
    public void addComment(Comment comment) {
        commentMapper.insert(comment);
        logger.info("添加评论成功");
    }

    /**
     * 删除评论
     */
    public void deleteComment(List<Integer> id) {
        commentMapper.deleteBatchIds(id);
        logger.info("删除评论成功");
    }

}
